Developing a novel prediction model in opioid overdose using machine learning; a pilot analytical study

Abstract Background and Aims The opioid epidemic has extended to many countries. Data regarding the accuracy of conventional prediction models including the Simplified Acute Physiologic Score (SAPS) II and acute physiology and chronic health evaluation (APACHE) II are scarce in opioid overdose cases. We evaluate the efficacy of adding quantitative electroencephalogram (qEEG) data to clinical and paraclinical data in the prediction of opioid overdose mortality using machine learning. Methods In a prospective study, we collected clinical/paraclinical, and qEEG data of 32 opioid‐poisoned patients. After preprocessing and Fast Fourier Transform analysis, absolute power was computed. Also, SAPS II was calculated. Eventually, data analysis was performed using SAPS II as a benchmark at three levels to predict the patient's course in comparison with SAPS II. First, the qEEG data set was used alone, secondly, the combination of the clinical/paraclinical, SAPS II, qEEG datasets, and the SAPS II‐based model was included in the pool of classifier models. Results Seven out of 32 (22%) died. SAPS II (cut‐off of 50.5) had a sensitivity/specificity/positive/negative predictive values of 85.7%, 84.0%, 60.0%, and 95.5% in predicting mortality, respectively. Adding majority voting on random forest with qEEG and clinical data, improved the model sensitivity, specificity, and positive and negative predictive values to 71.4%, 96%, 83.3%, and 92.3% (not significant). The model fusion level has 40% less prediction error. Conclusion Considering the higher specificity and negative predictive value in our proposed model, it could predict survival much better than mortality. The model would constitute an indicator for better care of opioid poisoned patients in low resources settings, where intensive care unit beds are limited.

Conclusion: Considering the higher specificity and negative predictive value in our proposed model, it could predict survival much better than mortality. The model would constitute an indicator for better care of opioid poisoned patients in low resources settings, where intensive care unit beds are limited.

| INTRODUCTION
Drug abuse, in particular, the abuse of heroin and morphine, is a global crisis and these two have been considered the drugs with one of the most potential adverse effects on human health. 1 Data from the Centers for Disease Control and Prevention in 2020 suggests that Opioids were involved in 46,802 overdose deaths in 2018 (69.5% of all drug overdose deaths). 2 In particular, methadone and tramadol have recently experienced increased exposure and therefore their associated mortality and morbidity have significantly increased. [3][4][5][6][7][8][9] Altered levels of consciousness are common in these poisonings. 3,4,8,9 Intoxicated patients may be referred with unstable vital signs, and their severity scores are generally higher than other patients at presentation; however, they usually improve easier with proper treatment and their prognosis may not be as severe as it appears on presentation. 10 In fact, it is not clear whether scores such as acute physiology and chronic health evaluation II (APACHE II) can be used in poisoned patients to the extent they are used for general intensive care unit (ICU) patients. 10 In recent years, attempts have been made to use quantitative electroencephalogram (qEEG) recordings as a predictor. Rots et al. used qEEG for the early detection of delayed cerebral ischemia (DCI) in aneurysmal subarachnoid hemorrhage (aSAH) and concluded that the implementation of qEEG for aSAH patients likely improves the early detection of DCI. 11 Crepeau et al. in a study to determine the prognostic value of EEG in therapeutic hypothermia after cardiac arrest, concluded that certain EEG changes correlated with the outcome. 12 In another study, Arzabou and colleagues mentioned that EEG-related features could be used as predictors of septic ICU mortality and delirium. 13 Hirsch (2004) reported that seizures after intracranial hemorrhage (ICH; mainly nonconvulsive) were accompanied by a remarkable increase in mass effect and a poor prognosis. 14 However, there is no information on the prognostic value of EEG in drug poisoning patients.
Based on the recent advances in machine learning, medical researchers have tried this approach in the field of EEG. 15 In a study conducted by Fingelkurts and colleagues, they confirmed the prognostic value of qEEG with regard to survival in vegetative and minimally conscious state patients. 16 In another study carried out by Khodayari-Rostamabad et al., the authors successfully combined pretreatment EEG data and machine learning to predict schizophrenia patients' response to clozapine therapy. 17 Löfhede and colleagues applied Fisher's linear discriminant (FLD), support vector machine (SVM), and feed-forward artificial neural networks (ANN) on burst-suppression EEG from infants with perinatal asphyxia where SVM demonstrated better results compared to other methods. 18 Tenev and associates showed that SVM could be used to distinguish adults with attention deficit hyperactivity disorder (ADHD) based on the EEG power spectrum. 19 Currently, there is no computational method to determine the prognosis in opioid-poisoned patients. However, the opportunity to identify patients at high risk of death would allow for the wellinformed direction of resources, and so may help decrease mortality in emergency departments. Moreover, EEG measurements are not costly and can be done at the bedside, so it is a practical tool in a clinical setting. Here, we evaluate the efficacy of qEEG data alone and fuse it with clinical/paraclinical data and Simplified Acute Physiology Score (SAPS) II (SAPS II scores consist of 17 variables   including 12 physiologic factors, age, type of admission, and 3 variables regarding underlying diseases) in distinct scenarios for developing prediction models that differentiate surviving from nonsurviving opioid-overdosed patients using machine learning. This approach may also help a better understanding of the underlying origins determining survival and nonsurvival, which can give rise to novel treatment options in the future. Opioid overdose was suspected when signs and symptoms of opioid toxicity were observed. Confirmation was achieved using laboratory confirmatory testing, response to antidote (naloxone), and patient interview.

| Study design and participants
Patients who had undergone cardiopulmonary resuscitation (CPR), had no corneal reflex and no doll's eye in their primary examinations, denied opioid overdose or claimed multidrug poisoning after recovery (confirmed by negative urine test results), and those with sepsis, meningitis, and encephalitis during EEG recording and stroke or brain tumor in past medical history or brain computed tomography (CT) scans as well as pediatric patients and patients whose next of kin did not wish them to be included in the research were excluded before EEG recording.
Survivors were interviewed before discharge and confirmed the consumption of opioids. They also confirmed that they had no past history of meningitis, encephalitis, thyroid, and chronic liver dysfunction. In nonsurvivors, toxicology results during the autopsy were used for confirmation of diagnosis.

| Clinical and laboratory variables
Clinical data including past medical history, past drug history, the occurrence of seizure from admission to EEG recording, the occurrence of seizure from EEG recording to discharge, vital signs, GCS, urine output, and fever during EEG were evaluated. Laboratory variables include arterial blood pH (pH), arterial blood CO 2 pressure (pCO 2 ), arterial blood O 2 pressure (pO 2 ), arterial blood bicarbonate (HCO 3 ), serum creatinine (Cr), serum sodium (Na) and potassium (K), blood urea nitrogen (BUN), blood sugar (BS), bilirubin, complete blood count (CBC), as well as toxicology screening tests were recorded on presentation, in the second, third, fourth day after admission and also before EEG recording. These measurements were obtained in the lab exam and the abnormalities (in terms of clinical importance) were recorded in the first 24 h (after admission) and in the tests directly before EEG recordings. No missing data was observed to be handled.

| Brain imaging
Brain CT scans without contrast were performed for 29 patients based on on-arrival clinical conditions and ER physician's decision.
Based on the CT scans, one of the subjects had generalized white matter changes and two had generalized brain edema. These subjects were not excluded and survived.

| EEG recording
Electroencephalograms were performed in an eye-closed position with at least 10 min duration and using a portable EEG device (NCC System) placed on the scalp at the 10-20 international system coordinates. The electrode impedances were checked online and EEG signals were amplified and recorded with a sampling frequency of 128 Hz.

| Data processing and analysis
Clinical and paraclinical data were compared between survivors and nonsurvivors by applying the student t-test, Mann-Whitney U test if variables were normally/not normally distributed, respectively. To  (Table 1).

| qEEG data analysis
In this stage, the data set obtained from the EEG signals alone was used to predict the mortality of patients. As mentioned before, 20 important features were selected based on Random Forest feature importance criteria. Then MSC approach was implemented to predict the surviving and non-surviving patients.

| Feature fusion level
To achieve high prediction power, the idea of fusing the qEEG data set with gathered information for computing SAPS II was followed. At this level, we fused the qEEG data set with SAPS II and clinical/ paraclinical data used in the SAPS II calculation. As for the other scenarios, the same procedure of creating a pool of classifiers and selecting the most efficient ones was utilized to analyze the fused data and obtain the optimized model.  Informed written consent was taken from conscious patients. For loss of conscious patients who had no capacity for consent, it was taken from family members.

| Clinical and paraclinical results
Seven out of 32 patients died. Table 2 shows the clinical and demographic information of the patients. There were not any significant differences between the two groups in terms of brain CT scan findings and prescribing sedative drugs, so their effect on the EEG was not considered.

| qEEG results
As the number of samples was too small, LOOCV was used to evaluate the models. In this cross-validation analysis, the result of testing each sample was aggregated in a confusion matrix.
In the qEEG data analysis (level 1) and the feature fusion level (level 2), the results achieved by Dynamic Ensemble Selection F I G U R E 2 Schematic summary of the procedure for patient recruitment and prognosis prediction. Triple scenarios to assess the ability of qEEG data in mortality prediction in opioid overdose patients. In the first scenario, we enter qEEG data lonely to an MCS and evaluate it by LOOCV (level 1). In the second scenario, we enter the fusion of qEEG data and clinical/paraclinical data to MCS and assess the effect of this extra data in the final results (level 2). In the third scenario, input data are like the second scenario, but we push the SAPS II classifier in the classifier pool embedded in MCS (level 3). (In the schematic, "Yes" indicates that at least one of the conditions for exclusion was fulfilled.) LOOCV, leave-one-out cross-validation; MCS, multiclassifier system; qEEG, quantitative electroencephalogram.  The patients were included with any level of loss of consciousness. This may be a potential problem limiting our results. Another limitation of the current study is its small sample size. Due to the limited number of patients, many static and dynamic classifier selections were employed for finding the best predictor and evaluated by LOOCV. By acquiring additional data in the future, the prediction performance of our proposed machine learning-based approach may be further refined. There is also a significant sex imbalance in our study and due to limitations in the number of personnel, there was a waiting time between admission of some of the patients and their EEG recordings. Taking into account this time elapsed between drug use and EEG recording could be a further informative factor in future studies.

| CONCLUSION
Although the machine learning was able to predict survival with more accuracy than SAPS using a combination of qEEG and clinical/ paraclinical information, this difference was not significant in our study.
This may support a prospective study utilizing qEEG to further strengthen the above results, and this can be the topic of a larger study. in the design of the study and collection, analysis, and interpretation of data and in writing the manuscript.